<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">

var accessToken=localStorage.getItem("accessToken");
     function doSearch() {
   		$('#dg').datagrid('options').pageNumber=1;//设置页码初始值为1
   	    $('#dg').datagrid({
   	        queryParams : $('#sform').serializeObject()
   	    });
	  }
     

 	$(document).ready(function(){
		$("#dg").datagrid({
			onDblClickRow: function (index,rows){	
				$('#dg').datagrid('selectRow',index); 
			        	var rows = $('#dg').datagrid('getSelected');
			        	if(rows!=null)
			        	{
			        	var url='${ctx}/Card/showDetail?&ywlsh='+rows.ywlsh;
			        	addTab("暂住证详细信息", url)
			        	
			        	}
			        	 else {
			        			$.messager.alert('警告', '请先选择一条记录！');
			        		}
            },
			onUnselect: function (rowIndex, rowData) {
            	
            }
        });
	
	});

	function addTab(title, url){
		if (parent.$('#tt').tabs('exists', title)){
			parent.$('#tt').tabs('select', title);
		} else {;
			var content = '<iframe scrolling="auto" frameborder="0"  src="'+url+"&accessToken="+accessToken+'" style="width:100%;height:100%;"></iframe>';
			parent.$('#tt').tabs('add',{
				title:title,
				content:content,
				closable:true
			});
		}
	}
</script>
<title>暂住证列表</title>
</head>
<body style="margin:0;padding:0">
     <div id="cc" class="easyui-layout"  data-options="fit:true">
     <%--查询条件--%>
	<div id="tb" style="padding: 10px;">
		<form id="sform" method="post">
            <!--  <input name="wfds" id="wfds" class="easyui-searchbox" data-options="prompt:'街路巷,门牌号,数据来源,街镇...',searcher:doSearch" style="width:33%">-->

 		行政区划：<input id="xzq" name="xzq" class="easyui-combotree"
				data-options="url:'',method:'get',required:false"
				style="width: 10%;">
			&nbsp;&nbsp;街(镇)：
			<input class="easyui-textbox" type="text" id="jz"name="jz" data-options=" width:'15%'"></input>
			&nbsp;&nbsp;居(村)委会：<input class="easyui-textbox" type="text" id="jwh" name="jwh" data-options=" width:'15%'"></input>
			&nbsp;&nbsp;暂住证号：<input class="easyui-textbox" type="text" id="zzzh" name="zzzh" data-options=" width:'15%'"></input>
			<br>
			街(路巷)：<input id="jddm" name="jddm" class="easyui-combotree"
				data-options="url:'',method:'get',required:false"
				style="width: 10%;">
			&nbsp;&nbsp;门(楼)牌号：
			<input class="easyui-textbox" type="text" id="zhid"name="zhid" data-options=" width:'15%'"></input>
			&nbsp;&nbsp;详址(房号)：<input class="easyui-textbox" type="text" id="fhid" name="fhid" data-options=" width:'15%'"></input>
			&nbsp;&nbsp;姓名：<input class="easyui-textbox" type="text" id="xm" name="xm" data-options=" width:'15%'"></input>
			<br>
			公民身份证号码：<input id="zjhm" name="zjhm" class="easyui-textbox"
				data-options="width:'15%'">
			&nbsp;&nbsp;性别：
			<select name="xb" size="10" class="easyui-combobox" style="width:80px;">
			<option value="1">男</option>
       		<option value="2">女</option>
			</select>
			
			&nbsp;&nbsp;详址：<input class="easyui-textbox" type="text" id="dz" name="dz" data-options=" width:'35%'"></input>
			<br>
			办证日期：<input type="text" name="qfrq"  id="qfrq" size="30" maxlength="50"
							class="easyui-datebox" data-options="required:false,width:'120px'"
							value="" />
			&nbsp;&nbsp;有效日期：
			<input type="text" name="yxqx"  id="yxqx" size="30" maxlength="50"
							class="easyui-datebox" data-options="required:false,width:'120px'"
							value="${vo.yxqx}" />
			&nbsp;&nbsp;暂住证是否过期：
			

			<select name="sfgq" size="10" class="easyui-combobox" style="width:80px;">
			<option value="1">是</option>
       		<option value="2">否</option>
			</select>
			
				
			&nbsp;&nbsp;有效截至日期：<input type="text" name="yxjzrq"  id="yxjzrq" size="30" maxlength="50"
							class="easyui-datebox" data-options="required:false,width:'120px'"
							value="${vo.yxjzrq}" />
			<br>
			是否注销：<input class="easyui-textbox" type="text" id="sfzx"name="sfzx" data-options=" width:'15%'"></input>
			<a href="javascript:void(0)" class="easyui-linkbutton"
				onclick="doSearch()" data-options="width:'5%'">查询</a>
			<a href="javascript:void(0)" class="easyui-linkbutton"
				onclick="reSet()" data-options="width:'5%'">重置</a>
			</form>
	 	<div id="win" class="easyui-window" title="暂住证信息"
	        data-options="iconCls:'${icon}',collapsible:false,minimizable:false,maximizable:false,closed:true"
	        style="width: 600px; height: 350px; background-color: white;"></div>
    </div>
	 <%--查询条件--%>
	<%--查询结果列表--%>
		<table class="easyui-datagrid" id="dg" style="width: 100%; height: 100%; padding: 0px;"
	        data-options="
	                border:false,
	                rownumbers:true,
	                singleSelect:false,
	                autoRowHeight:false, 
	                pagination:true,
	                toolbar:'#tb',
	                url:'${ctx}/Card/search',
	                pageSize:20">
			<thead>
				<tr>
				<!--<th data-options="field:'ck',checkbox:true"></th>-->
					<th field="lsh" hidden=true>流水号</th>
					<th field="ywlsh" hidden=true>业务流水号</th>
					<th field="jwh" width="10%" align="center">居(村)委会</th>
					<th field="zzzh" width="10%" align="center">暂住证号</th>
					<th field="sfgq" width="26%" align="center">暂住证是否过期</th>
					<th field="zzdzxz" width="10%" align="center">暂住地址详址</th>	
					<th field="xm" width="10%" align="center">姓名</th>
					<th field="zjhm" width="10%" align="center">公民身份号码</th>
					<th field="xb" width="10%" align="center">性别</th>
					<th field="dz" width="26%" align="center">详址</th>
					<th field="qfrq" width="10%" align="center">办证日期</th>	
					<th field="yxqx" width="10%" align="center">有效期限</th>
					<th field="yxjzrq" width="10%" align="center">有效截至日期</th>
					<th field="slh" width="10%" align="center">受理</th>
					<!--  <th field="xzq"  hidden=true>行政区</th>	-->
					<th field="jz" width="10%" align="center">街(镇)</th>
					<th field="sfzx" width="10%" align="center">是否注销</th>
					<th field="entityname" width="10%" align="center">实体名称</th>		
				</tr>
			</thead>
		</table>
     
    </div>
</body>
</html>
